webupdater.data = function() {
	var YAHOO_API_KEY = "";
	var FLICKR_API_KEY = "e20304bc2b64bf3eebff24982e12e106";
	var DELICIOUS_API_KEY = "";
	//not needed since YouTube switched to the GData APIs
	//var YOUTUBE_DEVELOPER_ID = "zq-435FgYcc";
	
	//private methods
	
	var getUserNameForSite = function(sApiUrl, siteName) {
		var url = sApiUrl;
		var username = webupdater.bridge.getUsernameForSite(siteName);
		return url;
	}
	
	return {
		getDeliciousTags : "",
		getMyWebTags : "",
		getFlickrTags : "",
		getYouTubeTags : "",
		saveSiteLogin : "",
		getTags : ""
	}
}

webupdater.data.getDeliciousTags = function() {
	var apiUrl = "http://del.icio.us/feeds/json/tags/%user%";
}

webupdater.data.getMyWebTags = function() {
	var apiUrl = "http://search.yahooapis.com/MyWebService/V1/tagSearch?output=json";
}

webupdater.data.getFlickrTags = function() {
	var apiUrl = "http://api.flickr.com/services/rest/?method=flickr.tags.getListUser&format=json";
}

webupdater.data.getYouTubeTags = function() {
	var keywords = new Array();
	var callback = {
		success: "",
		failure: handleError,
		argument: { "alt":"json" }
	}
	
	var handleError = function(o) {
		webupdater.ui.displayMessage("Your data could not be fetched from YouTube at this time. Reason:" + o.statusText);
		webupdater.bridge.trace("Failed to fetch from YouTube." + o.statusText + " " + o.status);
	}
	
	var apiUrl = "http://gdata.youtube.com/feeds/users/%user%/uploads?alt=json";
	
	var urlToCall = this.getUserNameForSite(apiUrl, "YouTube");
	var request = YAHOO.util.Connect.asyncRequest('GET', urlToCall, callback); 
	var videoInfo = eval(request.responseText);
	for(t=0; t < videoInfo.feed.entry.length-1; t++) {
		var entryKeywords = videoInfo.feed.entry[t].split(",");
		for(i = 0; i < entryKeywords.length-1; i++) {
			this.keywords.push(entryKeywords[i]);
		}
	}
	return this.keywords;
}

